﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
		xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
	<Style x:Key="ScrollBarLineButton" TargetType="RepeatButton">
		<Setter Property="SnapsToDevicePixels" Value="True" />
		<Setter Property="OverridesDefaultStyle" Value="True" />
		<Setter Property="Focusable" Value="False" />
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="RepeatButton">
					<Border x:Name="Border" BorderThickness="1">
						<Border.Background>
							<SolidColorBrush x:Name="BorderBackground" Color="{DynamicResource WhiteColor}" />
						</Border.Background>
						<Border.BorderBrush>
							<SolidColorBrush x:Name="BorderBorder" Color="#FFABABAB" />
						</Border.BorderBrush>
						<Path x:Name="Arrow" HorizontalAlignment="Center" VerticalAlignment="Center"
								Data="{Binding Content,  RelativeSource={RelativeSource TemplatedParent}}">
							<Path.Fill>
								<SolidColorBrush x:Name="fill" Color="#FF777777" />
							</Path.Fill>
						</Path>
						<VisualStateManager.VisualStateGroups>
							<VisualStateGroup x:Name="CommonStates">
								<VisualState x:Name="Normal">
									<Storyboard>
										<ColorAnimationUsingKeyFrames Storyboard.TargetName="BorderBorder"
												Storyboard.TargetProperty="Color">
											<EasingColorKeyFrame KeyTime="0:0:0.1" Value="#FFABABAB" />
										</ColorAnimationUsingKeyFrames>
										<ColorAnimationUsingKeyFrames Storyboard.TargetName="BorderBackground"
												Storyboard.TargetProperty="Color">
											<EasingColorKeyFrame KeyTime="0:0:0.1" Value="{DynamicResource WhiteColor}" />
										</ColorAnimationUsingKeyFrames>
									</Storyboard>
								</VisualState>
								<VisualState x:Name="MouseOver">
									<Storyboard>
										<ColorAnimationUsingKeyFrames Storyboard.TargetName="BorderBorder"
												Storyboard.TargetProperty="Color">
											<EasingColorKeyFrame KeyTime="0:0:0.1" Value="#FF777777" />
										</ColorAnimationUsingKeyFrames>
									</Storyboard>
								</VisualState>
								<VisualState x:Name="Pressed">
									<Storyboard>
										<ColorAnimationUsingKeyFrames Storyboard.TargetName="BorderBackground"
												Storyboard.TargetProperty="Color">
											<EasingColorKeyFrame KeyTime="0:0:0.1" Value="#FFF0F0F0" />
										</ColorAnimationUsingKeyFrames>
									</Storyboard>
								</VisualState>
								<VisualState x:Name="Disabled" />
							</VisualStateGroup>
						</VisualStateManager.VisualStateGroups>
					</Border>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
	<Style x:Key="ScrollBarPageButton" TargetType="RepeatButton">
		<Setter Property="SnapsToDevicePixels" Value="True" />
		<Setter Property="OverridesDefaultStyle" Value="True" />
		<Setter Property="IsTabStop" Value="False" />
		<Setter Property="Focusable" Value="False" />
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="RepeatButton">
					<Border Background="Transparent" />
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
	<Style x:Key="ScrollBarThumb" TargetType="Thumb">
		<Setter Property="SnapsToDevicePixels" Value="True" />
		<Setter Property="OverridesDefaultStyle" Value="True" />
		<Setter Property="IsTabStop" Value="False" />
		<Setter Property="Focusable" Value="False" />
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="Thumb">
					<Border BorderThickness="1">
						<Border.Background>
							<SolidColorBrush x:Name="BorderBackground" Color="{DynamicResource WhiteColor}" />
						</Border.Background>
						<Border.BorderBrush>
							<SolidColorBrush x:Name="BorderBorder" Color="#FFABABAB" />
						</Border.BorderBrush>
						<VisualStateManager.VisualStateGroups>
							<VisualStateGroup x:Name="CommonStates">
								<VisualState x:Name="Normal">
									<Storyboard>
										<ColorAnimationUsingKeyFrames Storyboard.TargetName="BorderBackground"
												Storyboard.TargetProperty="Color">
											<EasingColorKeyFrame KeyTime="0:0:0.1" Value="{DynamicResource WhiteColor}" />
										</ColorAnimationUsingKeyFrames>
										<ColorAnimationUsingKeyFrames Storyboard.TargetName="BorderBorder"
												Storyboard.TargetProperty="Color">
											<EasingColorKeyFrame KeyTime="0:0:0.1" Value="#FFABABAB" />
										</ColorAnimationUsingKeyFrames>
									</Storyboard>
								</VisualState>
								<VisualState x:Name="MouseOver">
									<Storyboard>
										<ColorAnimationUsingKeyFrames Storyboard.TargetName="BorderBackground"
												Storyboard.TargetProperty="Color">
											<EasingColorKeyFrame KeyTime="0:0:0.1" Value="#FFF0F0F0" />
										</ColorAnimationUsingKeyFrames>
									</Storyboard>
								</VisualState>
								<VisualState x:Name="Pressed">
									<Storyboard>
										<ColorAnimationUsingKeyFrames Storyboard.TargetName="BorderBackground"
												Storyboard.TargetProperty="Color">
											<EasingColorKeyFrame KeyTime="0:0:0.1" Value="#FFF0F0F0" />
										</ColorAnimationUsingKeyFrames>
										<ColorAnimationUsingKeyFrames Storyboard.TargetName="BorderBorder"
												Storyboard.TargetProperty="Color">
											<EasingColorKeyFrame KeyTime="0:0:0.1" Value="#FF777777" />
										</ColorAnimationUsingKeyFrames>
									</Storyboard>
								</VisualState>
								<VisualState x:Name="Disabled" />
							</VisualStateGroup>
						</VisualStateManager.VisualStateGroups>
					</Border>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
	<ControlTemplate x:Key="VerticalScrollBar" TargetType="{x:Type ScrollBar}">
		<Grid>
			<Grid.RowDefinitions>
				<RowDefinition MaxHeight="14" />
				<RowDefinition Height="*" />
				<RowDefinition MaxHeight="14" />
			</Grid.RowDefinitions>
			<Rectangle Grid.RowSpan="3" Fill="#FFF3F3F3" IsHitTestVisible="False" />
			<RepeatButton Grid.Row="0" Style="{StaticResource ScrollBarLineButton}" Height="14"
					Command="ScrollBar.LineUpCommand" Content="M 0 4 L 7 4 L 3.5 0 Z" />
			<Track x:Name="PART_Track" Grid.Row="1" IsDirectionReversed="True" Margin="0,1">
				<Track.DecreaseRepeatButton>
					<RepeatButton Style="{StaticResource ScrollBarPageButton}" Command="ScrollBar.PageUpCommand" />
				</Track.DecreaseRepeatButton>
				<Track.Thumb>
					<Thumb Style="{StaticResource ScrollBarThumb}" Background="{DynamicResource White}" />
				</Track.Thumb>
				<Track.IncreaseRepeatButton>
					<RepeatButton Style="{StaticResource ScrollBarPageButton}" Command="ScrollBar.PageDownCommand" />
				</Track.IncreaseRepeatButton>
			</Track>
			<RepeatButton Grid.Row="3" Style="{StaticResource ScrollBarLineButton}" Height="14"
					Command="ScrollBar.LineDownCommand" Content="M 0 0 L 3.5 4 L 7 0 Z" />
		</Grid>
	</ControlTemplate>
	<ControlTemplate x:Key="HorizontalScrollBar" TargetType="{x:Type ScrollBar}">
		<Grid>
			<Grid.ColumnDefinitions>
				<ColumnDefinition MaxWidth="14" />
				<ColumnDefinition Width="*" />
				<ColumnDefinition MaxWidth="14" />
			</Grid.ColumnDefinitions>
			<Rectangle Grid.ColumnSpan="3" Fill="#FFF3F3F3" IsHitTestVisible="False" />
			<RepeatButton Grid.Column="0" Style="{StaticResource ScrollBarLineButton}" Width="14"
					Command="ScrollBar.LineLeftCommand" Content="M 4 0 L 4 7 L 0 3.5 Z" />
			<Track x:Name="PART_Track" Grid.Column="1" IsDirectionReversed="False" Margin="1,0">
				<Track.DecreaseRepeatButton>
					<RepeatButton Style="{StaticResource ScrollBarPageButton}" Command="ScrollBar.PageLeftCommand" />
				</Track.DecreaseRepeatButton>
				<Track.Thumb>
					<Thumb Style="{StaticResource ScrollBarThumb}" Background="{DynamicResource White}" />
				</Track.Thumb>
				<Track.IncreaseRepeatButton>
					<RepeatButton Style="{StaticResource ScrollBarPageButton}" Command="ScrollBar.PageRightCommand" />
				</Track.IncreaseRepeatButton>
			</Track>
			<RepeatButton Grid.Column="3" Style="{StaticResource ScrollBarLineButton}" Width="14"
					Command="ScrollBar.LineRightCommand" Content="M 0 0 L 4 3.5 L 0 7 Z" />
		</Grid>
	</ControlTemplate>
	<Style TargetType="ScrollBar">
		<Setter Property="SnapsToDevicePixels" Value="True" />
		<Setter Property="OverridesDefaultStyle" Value="True" />
		<Setter Property="Margin" Value="1" />
		<Style.Triggers>
			<Trigger Property="Orientation" Value="Horizontal">
				<Setter Property="Width" Value="Auto" />
				<Setter Property="Height" Value="15" />
				<Setter Property="Template" Value="{StaticResource HorizontalScrollBar}" />
			</Trigger>
			<Trigger Property="Orientation" Value="Vertical">
				<Setter Property="Width" Value="15" />
				<Setter Property="Height" Value="Auto" />
				<Setter Property="Template" Value="{StaticResource VerticalScrollBar}" />
			</Trigger>
		</Style.Triggers>
	</Style>
</ResourceDictionary>